﻿<p class="message_title">有什么意见或者建议，请在这里留言。</p>
<div class="review_box">
      <h4 class="review_title"><{t}>客户留言<{/t}></h4>
<div class="division">
     <{pager data=$pager}>
  <{if $message_open == 'on'}>
  <form class="addcomment " method="post" action='<{link app=b2c ctl="site_message" act="sendMsgToOpt"}>' onsubmit='checkFormReqs(event);'>
  <div class="loginbox" style="border:none">
  <ul>
  <li><label><em style='color:red'>*</em><{t}>标题：<{/t}></label><div class="floatdiv"><{input type="text" required="true" class='inputstyle' style=" width:465px" size=50 name="subject"}></div></li>
  <li><label><em style='color:red'>*</em><{t}>留言内容：<{/t}></label><div class="floatdiv"><{input type="textarea" required="true" rows="5" name="message" class='inputstyle' style='width:465px'}></div></li>
   <{if $login eq 'NO'}>
  <li><label><{t}>联系方式：<{/t}></label><div class="floatdiv"><{input type="text"  size=24 name="contact" maxlength=255 class='inputstyle'}><br /><{t}>(QQ、MSN、Email、电话等，此信息不会被公开)<{/t}></li>
   <{/if}>
      <{if $msgshow == "on" }>
  <li><label><em style='color:red'>*</em><{t}>验证码：<{/t}></label><div class="floatdiv"><{input type="number" required="true" size="4" maxlength="4" name="verifyCode" class='inputstyle'}>&nbsp;<img src="<{link app="b2c" ctl="site_message" act="verifyCode"}>" border="1" id="imgVerifyCode"/><a href="javascript:changeimg()">&nbsp;<{t}>看不清楚?换个图片<{/t}></a></div></li><{/if}>
  <li><label></label><div class="floatdiv"><button id="cart-coupon-submitBtn" class="btn dicusbtn " type="submit"> <span><span> <{t}>提交评论<{/t}></span></span> </button></div></li>
  </ul>
  </div>
  
  <!--<table width="100%" border="0" cellspacing="0" cellpadding="0" class="forform">
      <tr>
      <th><em style='color:red'>*</em><{t}>标题：<{/t}></th>
      <td><{input type="text" required="true" class='inputstyle' style=" width:465px" size=50 name="subject"}></td>
    </tr>
      <tr>
      <th><em style='color:red'>*</em><{t}>留言内容：<{/t}></th>
      <td><{input type="textarea" required="true" rows="5" name="message" class='inputstyle' style='width:80%'}></td>
    </tr>
      <{if $login eq 'NO'}>
      <tr>
      <th><{t}>联系方式：<{/t}></th>
      <td><{input type="text"  size=24 name="contact" maxlength=255 class='inputstyle'}><br /><{t}>(QQ、MSN、Email、电话等，此信息不会被公开)<{/t}></td>
    </tr>
      <{/if}>
      <{if $msgshow == "on" }>
      <tr>
      <th><em style='color:red'>*</em><{t}>验证码：<{/t}></th>
      <td><{input type="number" required="true" size="4" maxlength="4" name="verifyCode" class='inputstyle'}>&nbsp;<img src="<{link app="b2c" ctl="site_message" act="verifyCode"}>" border="1" id="imgVerifyCode"/><a href="javascript:changeimg()">&nbsp;<{t}>看不清楚?换个图片<{/t}></a></td>
    </tr>
      <{/if}>
      <tr>
      <th></th>
      <td style="padding-left:2px"><button id="cart-coupon-submitBtn" class="btn dicusbtn " type="submit"> <span><span> <{t}>提交评论<{/t}></span></span> </button></td>
    </tr>
    </table>-->
</form>
<{/if}>
      </div>
      </div>





<{if $msg}>
<div id="shop-message"> <{foreach from=$msg item=msglist}>
  <div class="division boxBlue clearfix mainReply" style="margin-bottom:0px;">
    <div class=" floatLeft commentMain">
      <div class="floatLeft commentAsk"><{t}>留言<{/t}></div>
      <span class="author fontcolorOrange"><{$msglist.author}></span>&nbsp;&nbsp;<{t}>说：<{/t}> <span class="timpstamp font10px fontcolorGray replies"><{$msglist.time|cdate:'SDATE_STIME'}></span>
      <div style="clear:both;"></div>
      <{*
      <h4><{$comment.title|escape:'html'}></h4>
      <h4><{$msglist.comment|nl2br}></h4>
      *}>
      <div class="commentText"><{$msglist.comment|nl2br}></div>
    </div>
  </div>
  <div class="commentReply"> <{foreach from=$msglist.reply item=items}>
    <div class="division  item " style=" margin:0px;" >
      <div class="floatLeft commentReply-admin"><{t}>回复<{/t}></div>
      <span class="author fontcolorOrange"><{$items.author}></span>&nbsp;&nbsp;<{t}>回复：<{/t}> <span class="timpstamp font10px fontcolorGray replies"><{$items.time|cdate:'SDATE_STIME'}></span>
      <div  style="clear:both;"></div>
      <div class="commentText"><{$items.comment|nl2br}></div>
    </div>
    <{/foreach}> </div>
  <{/foreach}> </div>
<{/if}>
<script>
    var checkFormReqs =function(e){
           e    = new Event(e);
       var form= $(e.target);
          
       var reqs = $$(form.getElements('input[type=text]'),form.getElements('textarea'));

       if(reqs.some(function(req){
               if(!req.get('required')&&!req.get('vtype').contains('required'))return;
            if(req.getValue().trim()==''){
                       req.focus();
                       MessageBox.error('<{t}>请完善表单必填项.<{/t}>');
                       return true;
            }
              
              return false;
              
       
       })){
           
           e.stop();
       
       }       

    };


 <{if $msgshow == "on" }>
   var changeimg = function(){
        $('imgVerifyCode').set('src','<{link app="b2c" ctl="site_message" act="verifyCode"}>#'+$time());
    }
 <{/if}>
</script>
<!--<{pager data=$pager}>
  <{if $message_open == 'on'}>
  <form class="addcomment division" method="post" action='<{link app=b2c ctl="site_message" act="sendMsgToOpt"}>' onsubmit='checkFormReqs(event);'>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forform">
      <tr>
      <th><em style='color:red'>*</em><{t}>标题：<{/t}></th>
      <td><{input type="text" required="true" size=50 name="subject"}></td>
    </tr>
      <tr>
      <th><em style='color:red'>*</em><{t}>留言内容：<{/t}></th>
      <td><{input type="textarea" required="true" rows="5" name="message" class='inputstyle' style='width:80%'}></td>
    </tr>
      <{if $login eq 'NO'}>
      <tr>
      <th><{t}>联系方式：<{/t}></th>
      <td><{input type="text"  size=24 name="contact" maxlength=255 class='inputstyle'}><{t}>(QQ、MSN、Email、电话等，此信息不会被公开)<{/t}></td>
    </tr>
      <{/if}>
      <{if $msgshow == "on" }>
      <tr>
      <th><em style='color:red'>*</em><{t}>验证码：<{/t}></th>
      <td><{input type="number" required="true" size="4" maxlength="4" name="verifyCode" class='inputstyle'}>&nbsp;<img src="<{link app="b2c" ctl="site_message" act="verifyCode"}>" border="1" id="imgVerifyCode"/><a href="javascript:changeimg()">&nbsp;<{t}>看不清楚?换个图片<{/t}></a></td>
    </tr>
      <{/if}>
      <tr>
      <th></th>
      <td><input type="submit" value="<{t}>提交<{/t}>" class='btn' ></td>
    </tr>
    </table>
</form>
<{/if}> -->